package com.server.commons.file.model.input;

import com.server.common.code.utils.DateUtil;
import com.server.common.code.utils.OptionalUtils;
import lombok.*;
import org.springframework.util.ObjectUtils;

@Getter
@Setter
public class UpLoadImageInput extends UploadFileInput {

    /**
     * 宽
     * @author LXC
     * @date 2023/2/5 22:37
     */
    private Integer width;

    /**
     * 高
     * @author LXC
     * @date 2023/2/5 22:37
     */
    private Integer height;

    public String getFileFullPath(){
        return getDir()
                + "/"
                + (ObjectUtils.isEmpty(getWidth())?"full":getWidth())
//                + "_"
//                + (ObjectUtils.isEmpty(getHeight())?"full":getHeight())
                + "-"
                + getFileCode()
                + "."
                + getSuffix();
    }
}
